
TARGET=test

GCC = g++
CFLAGS=--std=c++11 -m64 -g -Wall

SOURCE=$(wildcard *.cpp)
OBJS = $(patsubst %.cpp, %.o, $(SOURCE))
DEPS = $(patsubst %.o, %.d, $(OBJS))

INCLUDES=-I../include
LIBS =-lm

$(TARGET): $(OBJS)
	$(GCC) $(CFLAGS) $(OBJS) -L../lib $(LIBS) -o $@
%.o: %.cpp
	$(GCC) $(CFLAGS) $(INCLUDES) -c -MMD $< -o $@
-include $(DEPS)
clean:
	rm $(OBJS) $(TARGET)
